<tr>
  <th>模板循环</th>
  <td>
  {foreach $parameter}
  <li>{k}=>{v}</li>
  {/foreach}
  <php>echo '支持原生PHP代码';</php>
  </td>
</tr>
<tr class="blocktitle">
    <td colspan="2">-- 基本参数 --</td>
  </tr>
<tr>
  <th>json</th>
  <td>json数据转换 <script>var jsonvar = '{$configinfo[data_post]}';
  			   if(jsonvar) {
				   var data = JSON.parse(jsonvar);
				   var photos=data.more.photos;
				   var html='';
				   for(var i=0;i<photos.length;i++)
					{
						html += '<a href="javascript:;">'+photos[i].name+'</a>';
					}
					document.write(html);
			   }
        </script></td>
</tr>
<!--<tr>
  <th>parameter</th>
  <td><input class="form-control" type="text" name="parameter[parameter]" value="{$parameter[parameter]}" /></td>
</tr>-->
<tr>
  <th>parameter_json</th>
  <td><input class="form-control" type="text" name="parameter_json[parameter_json]" value="{$parameter_json[parameter_json]}" /></td>
</tr>
<tr>
  <th>小型整数参数</th>
  <td><input class="form-control" type="text" name="parameter[tintpara_paranew1]" value="{$parameter[paranew1]}" /></td>
</tr>
<!--<tr>
  <th>图片参数</th>
  <td><input class="form-control" type="text" name="parameter[imgtype_imgtest]" value="{$parameter[imgtest]}" /></td>
</tr>-->
<tr>
  <th>文件参数</th>
  <td><input class="form-control" type="text" name="parameter[filetype_filetest]" value="{$parameter[filetest]}" /></td>
</tr>
<tr>
  <th>addinput</th>
  <td><style>
 .wlbox{ width:100%; background:#f3f3f3; padding:2%;}
 .wlbox table{ width:100%; text-align:center;}
 .wlbox table td,.wlbox table th{ padding:5px;}
 .tianjia{ cursor:pointer; margin-top:10px; margin-left:5px; font-size:16px; font-weight:bold;}
 .shanchu{width:40px; height:20px; cursor:pointer;}
</style>
    <div class="wlbox">
      <table cellpadding="1" cellspacing="0" border="0">
        <tr class="di">
            <td align="left"><input type='text' name='parameter[textpara_jsontype_addinput][0][]' class="form-control" style="width:100%;" placeholder='请输入信息'/></td>
            <td align="left" width="250"><input type='text' name='parameter[textpara_jsontype_addinput][0][]' class="form-control" style="width:100%;" placeholder='请输入信息'/></td>
            <td align="left" width="150"><input type='text' name='parameter[textpara_jsontype_addinput][0][]' class="form-control" style="width:100%;" placeholder='请输入信息'/></td>
            <td align="left"><a class="shanchu" onClick="sc(this);">删除</a></td>
        </tr><!--默认可删除-->
      </table>
      <div class="tianjia"><span class="btn btn-default">点击添加</span></div>
      <div style="margin-top:10px; margin-left:5px;">{$parameter[jsontype_addinput]}</div>
    </div>
    <script>
	// js-获取JSON数组的长度
  	function getHsonLength(json){
        var jsonLength=0;
        for (var i in json) {
           jsonLength++;
        }
        return jsonLength;
    } 
	var tji = getHsonLength();
	$('.tianjia').click(function(e) {
		tji++;
		var html="<tr>";
		html+="<td align='left'><input type='text' name='parameter[textpara_jsontype_addinput]["+tji+"][]' class='form-control' style='width:100%;' placeholder='请输入信息'/></td>";
		html+="<td align='left'><input name='parameter[textpara_jsontype_addinput]["+tji+"][]' type='text' class='form-control' style='width:100%;' placeholder='请输入信息'/></td>";
		html+="<td align='left'><input type='text' name='parameter[textpara_jsontype_addinput]["+tji+"][]' class='form-control' style='width:100%;' placeholder='请输入信息'/></td>";
		html+="<td align='left'><a class='shanchu' onclick=\'sc(this)\'>删除</a></td></tr>";
	   $('.wlbox table').append(html);
	}); 
  

function sc(t){
	var indexnum = $(t).parent().parent().index();
	$(" .wlbox table tr").eq(indexnum).remove();
}	
</script></td>
</tr>
<tr class="blocktitle">
    <td colspan="2">-- 效果参数 --</td>
  </tr>
<tr>
    <th>其它图片</th>
    <td>
        <script type="text/plain" id="contenthsc1" name="parameter[textpara_contenthsc1]">{$parameter[contenthsc1]}</script>
        <script>
        editorcontent = new baidu.editor.ui.Editor();
        editorcontent.render('contenthsc1');
        try {
            editorcontent.sync();
        } catch (err) {
        }
        </script>
    </td>
</tr>
<tr>
    <th>缩略图</th>
    <td>
        <input type="hidden" name="parameter_default[thumbnail]" id="thumbnail"
               value="{$parameter_default[thumbnail]}">
        <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
<script>
var thumbnail = "{$parameter_default[thumbnail]}";
if(thumbnail){
	document.write('<img src="/upload/{$parameter_default[thumbnail]}" id="thumbnail-preview" width="135" style="cursor: pointer"/>');	
}else{
	document.write('<img src="/themes/admin_simpleboot3/public/assets/images/default-thumbnail.png" id="thumbnail-preview" width="135" style="cursor: pointer"/>');
}
</script>      
        </a>
        <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
    </td>
</tr>
<tr>
    <th>缩略图2</th>
    <td>
        <input type="hidden" name="parameter[imgtype_otherimg]" id="otherimg"
               value="{$parameter[otherimg]}">
        <a href="javascript:uploadOneImage('图片上传','#otherimg');">
<script>
var otherimg = "{$parameter[otherimg]}";
if(otherimg){
	document.write('<img src="/upload/{$parameter[otherimg]}" id="otherimg-preview" width="135" style="cursor: pointer"/>');	
}else{
	document.write('<img src="/themes/admin_simpleboot3/public/assets/images/default-thumbnail.png" id="otherimg-preview" width="135" style="cursor: pointer"/>');
}
</script>      
        </a>
        <input type="button" class="btn btn-sm btn-cancel-otherimg" value="取消图片">
    </td>
</tr>
<tr>
                        <th>相册</th>
                        <td>
                            <ul id="photos" class="pic-list list-unstyled form-inline" style="margin-bottom:0;">
                            <script>var jsonvar = '{$parameter_default[more]}';
							if(jsonvar) {
							   var data = JSON.parse(jsonvar);
							   if(data.photos) {
								   var photos=data.photos;
								   var html='';
								   for(var i=0;i<photos.length;i++)
									{
										html += '<li id="saved-image'+i+'"><input id="photo-'+i+'" type="hidden" name="photo_urls[]" value="/'+photos[i].url+'">';
										 html += '   <input class="form-control" id="photo-'+i+'-name" type="text" name="photo_names[]" value="'+photos[i].name+'" style="width: 200px;" title="图片名称">';
										  html += '  <img id="photo-'+i+'-preview" src="/upload/'+photos[i].url+'" style="height:36px;width: 36px;" onclick="parent.imagePreviewDialog(this.src);">';
										  html += '  <a href="javascript:thimgi('+i+')">替换</a><a href="javascript:delimgi('+i+');">移除</a>';
									html += '</li>';
									}
									document.write(html);
									function thimgi(i)
									{
										uploadOneImage("图片上传","#photo-"+i);
									}
									function delimgi(i)
									{
										$("#saved-image"+i).remove();
									}
							   }
							} 
							</script>
                                        
                            </ul>
                            <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
                               class="btn btn-sm btn-default">选择图片</a>
                        </td>
                    </tr>
<tr>
                        <th>视频</th>
                        <td class="form-inline">
                            <input id="file-video" class="form-control" type="text" name="post[more][video]"
                                   value="{$parameter_default[video]}" placeholder="请上传视频文件" style="width: 200px;">
                            <notempty name="post.more.video">
                                
                            </notempty>
<script>
var otherimg = "{$parameter_default[video]}";
if(otherimg){
	document.write('<a id="file-video-preview" href="/upload/{$parameter_default[video]}" target="_blank">下载</a>');	
}
</script> 
                            <a href="javascript:uploadOne('文件上传','#file-video','video');">上传</a>
                        </td>
                    </tr>
<tr>
        <th>简介内容</th>
        <td><textarea class="form-control" type="text" name="parameter[description]" style="height:120px;" />{$parameter[description]}</textarea></td>
      </tr>